package leetcode.code1091;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution1091 implements IDebug {
	public abstract int shortestPathBinaryMatrix(int[][] grid);

	@Override
	public void debug1() {
		String grid = "[[0,1],[1,0]]";
		int e = 2;
		this.debug(grid, e);
	}

	private void debug(String s, int e) {
		int[][] grid = HelpDebug.str2array1(s);
		int r = this.shortestPathBinaryMatrix(grid);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String grid = "[[0,0,0],[1,1,0],[1,1,0]]";
		int e = 4;
		this.debug(grid, e);
	}

	@Override
	public void debug3() {
		String grid = "[[1,0,0],[1,1,0],[1,1,0]]";
		int e = -1;
		this.debug(grid, e);
	}

	@Override
	public void debug4() {
		String grid = "[[0,0,0,0,1,1],[0,1,0,0,1,0],[1,1,0,1,0,0],[0,1,0,0,1,1],[0,1,0,0,0,1],[0,0,1,0,0,0]]";
		int e = 7;
		this.debug(grid, e);
	}

}
